<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script>
			function Car(color){
				this.color = color
			}
			// Car.prototype = {} 原型对象
			Car.prototype.name = "1"
			Car.prototype.lunzi = 4
			
			// 创建的对象 实例对象
			// 实例对象可以直接使用原型对象的数据
			var c1 = new Car("red")
			var c2 = new Car("blue")
			var c3 = new Car("green")
			console.log(c1)
			console.log(c1.name)
			console.log(c2)
			console.log(c3)
		</script>
	</body>
</html>
